using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeoAnalyticsServerTools._SummarizeData
{
    /// <summary>
    /// <para>Summarize Attributes</para>
    /// <para>Calculates summary statistics for fields in a feature class.</para>
    /// <para>计算要素类中字段的汇总统计数据。</para>
    /// </summary>    
    [DisplayName("Summarize Attributes")]
    public class SummarizeAttributes : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SummarizeAttributes()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_layer">
        /// <para>Input Layer</para>
        /// <para>The point, polyline, or polygon layer to be summarized.</para>
        /// <para>要汇总的点、折线或面图层。</para>
        /// </param>
        /// <param name="_output_name">
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// </param>
        /// <param name="_fields">
        /// <para>Fields</para>
        /// <para>A field or fields used to summarize similar features. For example, if you choose a single field called PropertyType with the values of commercial and residential, all of the fields with the value residential fields will be summarized together, with summary statistics calculated, and all of the fields with the value commercial will be summarized together. This example will results in two rows in the output, one for commercial, and one for residential summary values.</para>
        /// <para>用于汇总相似要素的一个或多个字段。例如，如果选择名为 PropertyType 的单个字段，其值为 commercial 和 residential，则将所有值为 residential 字段的字段汇总在一起，并计算汇总统计数据，并将所有值为 commercial 的字段汇总在一起。此示例将在输出中生成两行，一行用于商业，一行用于住宅汇总值。</para>
        /// </param>
        public SummarizeAttributes(object _input_layer, object _output_name, List<object> _fields)
        {
            this._input_layer = _input_layer;
            this._output_name = _output_name;
            this._fields = _fields;
        }
        public override string ToolboxName => "GeoAnalytics Server Tools";

        public override string ToolName => "Summarize Attributes";

        public override string CallName => "geoanalytics.SummarizeAttributes";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "workspace"];

        public override object[] ParameterInfo => [_input_layer, _output_name, _fields, _summary_fields, _output, _data_store.GetGPValue(), _time_step_interval, _time_step_repeat, _time_step_reference];

        /// <summary>
        /// <para>Input Layer</para>
        /// <para>The point, polyline, or polygon layer to be summarized.</para>
        /// <para>要汇总的点、折线或面图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_layer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output feature service.</para>
        /// <para>输出要素服务的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_name { get; set; }


        /// <summary>
        /// <para>Fields</para>
        /// <para>A field or fields used to summarize similar features. For example, if you choose a single field called PropertyType with the values of commercial and residential, all of the fields with the value residential fields will be summarized together, with summary statistics calculated, and all of the fields with the value commercial will be summarized together. This example will results in two rows in the output, one for commercial, and one for residential summary values.</para>
        /// <para>用于汇总相似要素的一个或多个字段。例如，如果选择名为 PropertyType 的单个字段，其值为 commercial 和 residential，则将所有值为 residential 字段的字段汇总在一起，并计算汇总统计数据，并将所有值为 commercial 的字段汇总在一起。此示例将在输出中生成两行，一行用于商业，一行用于住宅汇总值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fields")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public List<object> _fields { get; set; }


        /// <summary>
        /// <para>Summary Fields</para>
        /// <para>The statistics that will be calculated on specified fields.</para>
        /// <para>将对指定字段进行计算的统计信息。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summary Fields")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _summary_fields { get; set; } = null;


        /// <summary>
        /// <para>Output</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _output { get; set; }


        /// <summary>
        /// <para>Data Store</para>
        /// <para><xdoc>
        ///   <para>Specifies the ArcGIS Data Store where the output will be saved. The default is Spatiotemporal big data store. All results stored in a spatiotemporal big data store will be stored in WGS84. Results stored in a relational data store will maintain their coordinate system.</para>
        ///   <bulletList>
        ///     <bullet_item>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</bullet_item><para/>
        ///     <bullet_item>Relational data store—Output will be stored in a relational data store.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将保存输出的 ArcGIS Data Store。默认值为 Spatiotemporal 大数据存储。存储在时空大数据存储中的所有结果都将存储在 WGS84 中。存储在关系数据存储中的结果将保留其坐标系。</para>
        ///   <bulletList>
        ///     <bullet_item>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>关系数据存储 - 输出将存储在关系数据存储中。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Store")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _data_store_value _data_store { get; set; } = _data_store_value._SPATIOTEMPORAL_DATA_STORE;

        public enum _data_store_value
        {
            /// <summary>
            /// <para>Spatiotemporal big data store</para>
            /// <para>Spatiotemporal big data store—Output will be stored in a spatiotemporal big data store. This is the default.</para>
            /// <para>时空大数据存储 - 输出将存储在时空大数据存储中。这是默认设置。</para>
            /// </summary>
            [Description("Spatiotemporal big data store")]
            [GPEnumValue("SPATIOTEMPORAL_DATA_STORE")]
            _SPATIOTEMPORAL_DATA_STORE,

            /// <summary>
            /// <para>Relational data store</para>
            /// <para>Relational data store—Output will be stored in a relational data store.</para>
            /// <para>关系数据存储 - 输出将存储在关系数据存储中。</para>
            /// </summary>
            [Description("Relational data store")]
            [GPEnumValue("RELATIONAL_DATA_STORE")]
            _RELATIONAL_DATA_STORE,

        }

        /// <summary>
        /// <para>Time step interval</para>
        /// <para><xdoc>
        ///   <para>A value that specifies the duration of the time step. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        ///   <para>Time stepping can only be applied if time is enabled on the input.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>一个值，指定时间步长的持续时间。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        ///   <para>仅当输入上启用了时间时，才能应用时间步进。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time step interval")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_interval { get; set; } = null;


        /// <summary>
        /// <para>Time step repeat</para>
        /// <para>A value that specifies how often the time-step interval occurs. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>一个值，该值指定时间步长间隔发生的频率。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time step repeat")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_repeat { get; set; } = null;


        /// <summary>
        /// <para>Time step reference</para>
        /// <para>A date that specifies the reference time with which to align the time steps. The default is January 1, 1970, at 12:00 a.m. This parameter is only available if the input points are time enabled and represent an instant in time.</para>
        /// <para>指定用于对齐时间步长的参考时间的日期。默认值为 1970 年 1 月 1 日凌晨 12：00。仅当输入点启用了时间并表示时间中的瞬间时，此参数才可用。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time step reference")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_step_reference { get; set; } = null;


        public SummarizeAttributes SetEnv(object extent = null, object outputCoordinateSystem = null, object workspace = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, workspace: workspace);
            return this;
        }

    }

}